<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改登录日志')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-log-edit" th:object="${xspUserLoginLog}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">UUID：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户短号码：</label>
                <div class="col-sm-8">
                    <input name="userCode" th:field="*{userCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">第三方用户来源：</label>
                <div class="col-sm-8">
                    <select name="source" class="form-control m-b" th:with="type=${@dict.getType('user_source')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{source}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登录IP地址：</label>
                <div class="col-sm-8">
                    <input name="ipaddr" th:field="*{ipaddr}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登录地点：</label>
                <div class="col-sm-8">
                    <input name="loginLocation" th:field="*{loginLocation}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">浏览器类型：</label>
                <div class="col-sm-8">
                    <input name="browser" th:field="*{browser}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">操作系统：</label>
                <div class="col-sm-8">
                    <input name="os" th:field="*{os}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动作类型：</label>
                <div class="col-sm-8">
                    <select name="actionType" class="form-control m-b" th:with="type=${@dict.getType('log_login_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{actionType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户注册标记：</label>
                <div class="col-sm-8">
                    <input name="isNewUser" th:field="*{isNewUser}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登录设备号：</label>
                <div class="col-sm-8">
                    <input name="deviceNum" th:field="*{deviceNum}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "xsp/log";
        $("#form-log-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-log-edit').serialize());
            }
        }
    </script>
</body>
</html>